<h1>Federation Upstream: <b><%= fmt_string(upstream.name) %></b><%= fmt_maybe_vhost(upstream.vhost) %></h1>

<div class="section">
  <h2>Overview</h2>
  <div class="hider">
    <table class="facts">
      <tr>
        <th>URI</th>
        <td><%= fmt_string(upstream.value.uri) %></td>
      </tr>
      <tr>
        <th>Expires</th>
        <td><%= fmt_time(upstream.value.expires, 'ms') %></td>
      </tr>
      <tr>
        <th>Message TTL</th>
        <td><%= fmt_time(upstream.value['message-ttl'], 'ms') %></td>
      </tr>
      <tr>
        <th>Max Hops</th>
        <td><%= fmt_string(upstream.value['max-hops']) %></td>
      </tr>
      <tr>
        <th>Prefetch Count</th>
        <td><%= fmt_string(upstream.value['prefetch-count']) %></td>
      </tr>
      <tr>
        <th>Reconnect Delay</th>
        <td><%= fmt_time(upstream.value['reconnect-delay'], 's') %></td>
      </tr>
      <tr>
        <th>Ack Mode</th>
        <td><%= fmt_string(upstream.value['ack-mode']) %></td>
      </tr>
      <tr>
        <th>Trust User-ID</th>
        <td><%= fmt_boolean(upstream.value['trust-user-id']) %></td>
      </tr>
    </table>
  </div>
</div>

<div class="section-hidden">
  <h2>Delete this upstream</h2>
  <div class="hider">
    <form action="#/fed-parameters" method="delete" class="confirm">
      <input type="hidden" name="component" value="federation-upstream"/>
      <input type="hidden" name="vhost" value="<%= fmt_string(upstream.vhost) %>"/>
      <input type="hidden" name="name" value="<%= fmt_string(upstream.name) %>"/>
      <input type="submit" value="Delete this upstream"/>
    </form>
  </div>
</div>
